www.gusucode.com > 地方成人教育中心整站源代码 1 > 地方成人教育中心整站源代码 1.0/manage/Admin_ProductSort.asp

    <!--#include file="chkuser.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="Function/Function_Sort.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="copyright" content="Copyright 2008 dananshan.com" />
<meta name="Author" content="闪电文章管理系统技术支持---www.dananshan.com" />
<meta name="Keywords" content="闪电文章管理系统文章管理系统" />
<meta name="Description" content="闪电文章管理系统文章管理系统" />
<title>服务类别</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/Admin.js"></script>
</head>
<body>
<%
'========判断是否具有管理权限
if Instr(session("AdminPower"),"|41,")=0 then 
	response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
	response.end
else
	call Main_Content()
	if Request.QueryString ("Form")="Add" then
		call Add_Content()
	elseif Request.QueryString ("Form")="Edit" then
		ID=Request.QueryString ("ID")
		if ID<>"" and Isnumeric(ID) then
			call Edit_Content(ID)
		end if	
	end if
end if
%>
</body>
</html>
<%
Function Main_Content()
	response.write "<div id='frame_Toolbar' class='toolbarBg'> "
	response.write "<a href='javascript:self.history.back();' class='icoBtn_ct'><span class='btnIco btnBack'></span><span class='btnTxt'>返回</span></a>"
	response.write "<a href='javascript:self.location.reload();' class='icoBtn_ct'><span class='btnIco btnReload'></span><span class='btnTxt'>刷新</span></a> <span class='split ftSplit' ></span>"
	response.write "<div id='guide'>点击<span class='light_orange'> 类别名称 </span>进行编辑</div>"
	response.write "<div class='pageInfo right light_gray'>[当前共有<span id='Label_total_top' class='light_bOrange'>"&Inf_Count()&"</span>条记录]</div>"
	response.write "</div>"
	response.write "<form method='POST' id=form2 name='form2'>"
	response.write "<div id='content'>"
	response.write "<table class='cTable table tCenter'>"
	response.write "<tr class='cTitle toolbarBg' id='Title'>"
	response.write "<td width='5%'><div>NO.</div></td>"
	response.write "<td width='70%'><span class='split ctSplit'></span><div>类别名称</div></td>"
	response.write "<td width='15%'><span class='split ctSplit'></span><div>是否发布</div></td>"
	response.write "<td width='10%'><span class='split ctSplit'></span><div>"
	response.write "<input type='button' class='button' style='width:31px;height:19px;padding-top:2px;' name='Btn_Select' value='全选' onClick='selectall()'>&nbsp;"
	response.write "<input type='button' class='button' style='width:31px;height:19px;padding-top:2px;' name='Btn_Cancel' value='反选' onClick='cancelall()'>"
	response.write "</div>"
	response.write "</td>"
	response.write "</tr>"
	response.write "</table>"
	response.write "<table class='cTable table tCenter' cellspacing='0' border='0' style='border-collapse:collapse;'>"
    sql="Select * From Idea_ProductSort order by id"
	set rs=idea.exec(sql,1)
	if not rs.eof then
		rs.pagesize=14
		curpage=Request.QueryString("curpage")
		if curpage="" then curpage=1
		rs.absolutepage=curpage
		for i=1 to rs.pagesize
		if rs.eof then
		exit for
		end if
		response.Write"<tr>"
		response.Write"<td align='center' style='width:5%;'><span>"&rs("ID")&"</span></td>"	
		response.Write"<td style='width:70%;text-align:left;'><span><img src='images/folder+.gif'>&nbsp;<a href='?Form=Edit&ID="&rs("ID")&"'>"&rs("SortName")&"</a></span></td>"
		if rs("IsShow")=true then
		response.Write"<td style='width:15%;' align='center'><div style='width:15px;height:10px;background-image: url(images/IcoBtn.gif); background-repeat: no-repeat; border: 0;background-position: -470px -3px;'></div></td>"
		else
		response.Write"<td style='width:15%;' align='center'><div style='width:15px;height:10px;background-image: url(images/IcoBtn.gif); background-repeat: no-repeat; border: 0;background-position: -485px -3px;'></div></td>"
		end if
		response.Write"<td align='center' style='width:10%;'><div style='float:left;width:50px;height:17px;background-image: url(images/IcoBtn.gif); background-repeat: no-repeat; border: 0;background-position: -222px 0px;'><a href='?Form=Edit&ID="&rs("ID")&"'><img width='50' height='17' style='border:0;' src='images/Empty.gif'></a></div>"
		response.Write"<input type='checkbox' name='chk' value='"&rs("ID")&"' />"
		response.Write"</td>"
		response.Write"</tr>"
		rs.movenext
		next
	else
		response.Write"<tr><td colspan='3' align='center' style='width:100%;'>暂无分类!</td><td></td></tr>"
	end if
	response.Write "<tr>"
	response.Write "<td colspan='3' width='90%'></td>"
	response.Write "<td align='center'>"
	response.Write "<input type='submit' class='button' style='width:80px;height:19px;padding-top:2px;' id='Btn_DellAll' name='Btn_DellAll' value='删除所选' onClick=""document.form2.action='?Action=delall&str=Product';return confirm('确定要删除分类及其下内容?');"">"
	response.Write "</td>"
	response.Write "</tr>"
	response.Write "</table>" 
	response.Write "<div id='cEndToolbar' class='toolbarBg'>"
	response.Write "<div class='pageBtnDo'>"
	response.Write "<a href='?Form=Add'>添加分类</a>"
	response.Write "</div>"
	response.Write "<div class='pageList'>"
	if curpage=1 then
		Response.Write "首页&nbsp;|&nbsp;"
	else
		Response.Write "<a href='?curpage=1'>首页</a>&nbsp;|&nbsp;"
	end if
	if curpage=1 then
		Response.Write "上一页&nbsp;|&nbsp;"
	else
		Response.Write "<a href='?curpage="&curpage-1&"'>上一页</a>&nbsp;|&nbsp;"
	end if
	if rs.pagecount<curpage+1 then
		Response.Write "下一页&nbsp;|&nbsp;"
	else
		Response.Write "<a href='?curpage="&curpage+1&"'>下一页</a>&nbsp;|&nbsp;"
	end if
	if rs.pagecount<curpage+1 then
		Response.Write "尾页&nbsp;&nbsp;"
	else
		Response.Write "<a href='?curpage="&rs.pagecount&"'>尾页</a>&nbsp;&nbsp;"
	end if
		Response.Write "当前第"&curpage&"页&nbsp;"
		Response.Write "共"&rs.pagecount&"页&nbsp;&nbsp;"
	response.Write "</div>"
	rs.close()
	set rs=nothing
	response.Write "</div>"
	response.Write "</form>"
End Function

Function Add_Content()
	response.write "<form action='?Action=Add&str=Product' method='post'>"
	response.write "<table class='cTable table tCenter'>"
	response.write "<tr class='cTitle toolbarBg'>"
	response.write "<td colspan='2' align='left'><span class='light_bOrange'>&nbsp;&nbsp;&nbsp;&nbsp;添加类别</span></td>"
	response.write "</tr><tr>"
	response.write "<td width='15%' class='tRight'>类别名称:</td>"
	response.write "<td width='85%' align='left'><input name='SortName' type='text' size='40'>"
	response.write "<input name='IsShow' type='checkbox' value='checkbox' checked='checked'>发布</td>"
	response.write "</tr></table>"
	response.write "<div id='cEndToolbar' class='toolbarBg'>"
	response.write "<div class='caButCase' style='text-align:left;padding-left:16%;'>"
	response.write "<input type='submit' id='Btn_Add' class='button' name='Btn_Add' value='确定添加'>&nbsp;"
	response.Write "<input type='reset' name='Btn_AddReset' value='清空重填' class='button'>"
	response.write "</div>"
	response.write "</div>"
	response.write "</form>"
End Function

Function Edit_Content(ID)
    sql="select * from Idea_ProductSort where ID="&ID
	set rs=idea.exec(sql,1)
	response.write "<form action='?Action=Update&str=Product&ID="&ID&"' method='post'>"
	response.write "<table class='cTable table tCenter'>"
	response.write "<tr class='cTitle toolbarBg'>"
	response.write "<td colspan='2' align='left'><span class='light_bOrange'>&nbsp;&nbsp;&nbsp;&nbsp;编辑类别</span></td>"
	response.write "</tr><tr>"
	response.write "<td width='15%' class='tRight'>类别名称:</td>"
	response.write "<td width='85%' align='left'><input name='SortName' type='text' size='40' value='"&rs("SortName")&"'>"
	if rs("IsShow")=true then
	response.write "<input name='IsShow' type='checkbox' value='checkbox' checked='checked'>发布</td>"
	else
	response.write "<input name='IsShow' type='checkbox' value='checkbox'>发布</td>"
	end if
	response.write "</tr></table>"
	rs.close
	set rs=nothing
	response.write "<div id='cEndToolbar' class='toolbarBg'>"
	response.write "<div class='caButCase' style='text-align:left;padding-left:16%;'>"
	response.write "<input type='submit' id='Btn_Add' class='button' name='Btn_Add' value='确定更新'>&nbsp;"
	response.Write "<input type='reset' name='Btn_AddReset' value='清空重填' class='button'>"
	response.write "</div>"
	response.write "</div>"
	response.write "</form>"
End Function

Function Inf_Count()
    sql="select * from Idea_ProductSort"
	set rs=idea.exec(sql,1)
    Inf_Count=rs.recordcount
	rs.close
	set rs=nothing
End Function
%>